﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CodeSystem.Models
{
    public class ApiResultMd
    {
        /// <summary>
        /// 返回码
        /// </summary>
        public ResponseCode code { get; set; }
        /// <summary>
        /// 返回数据
        /// </summary>
        public object data { get; set; }
        /// <summary>
        /// 错误信息
        /// </summary>
        public string msg { get; set; }
    }
    public enum ResponseCode
    {
        /// <summary>
        /// 请求成功
        /// </summary>
        Success = 200,
        /// <summary>
        /// 请求失败
        /// </summary>
        Fail = 400,
        /// <summary>
        /// 请求异常
        /// </summary>
        Exception = 500,
        /// <summary>
        /// 未授权的请求
        /// </summary>
        Unauthorized = 401,
        /// <summary>
        /// 字段未通过检验
        /// </summary>
        ValidationError = 402
    }
}